package com.ruoyi.tplus.controller;

import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.tplus.service.ITPlusService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/tplus")
public class TPlusReceiptAndPaymentController {
    Logger LOGGER = LoggerFactory.getLogger(TPlusReceiptAndPaymentController.class);

    @Autowired
    private ITPlusService tplusService;
    /**
     * 销货单上传
     */
    @RequestMapping("/receiptAndPayment")
    public AjaxResult tplusXhd(@RequestBody String temp){

        JSONObject entries = JSONUtil.parseObj(temp);//data
        Map map = tplusService.insertOrUpdateReceiptAndPayment(temp);
        return AjaxResult.success();
    }
}
